﻿using H.Daos;
using H.Eyes;
using H.Hands;
using H.Logs;
using H.QuickDoes;
using System;

namespace H.Kernel
{
    /// <summary>
    /// 表示一个控制器上下文,其中包含了所有控制器需要用到的组件
    /// </summary>
    public class ControllerContext
    {
        /// <summary>
        /// 键鼠操作实例
        /// </summary>
        public IHand Hand { get; set; }

        /// <summary>
        /// 图色识别实例
        /// </summary>
        public IEye Eye { get; set; }

        /// <summary>
        /// 数据访问层
        /// </summary>
        public IDao Dao { get; set; }

        /// <summary>
        /// 日志收集器
        /// </summary>
        public ILogCollector Log { get; set; }

        /// <summary>
        /// 快速操作工厂
        /// </summary>
        public readonly Lazy<IQuickDoFactory> QuickDoFactory = new Lazy<IQuickDoFactory>(() => IPlugin.GetObject<IQuickDoFactory>("H.QuickDo"));



    }
}
